<?php 
class setLangAction extends sfAction{
	public function execute($request){
		$lang = $request->getParameter('lang', '');
		$menu = $request->getParameter('menu', '/home');
		if (empty($lang)){
			echo '0';
			return sfView::NONE;
		}else{
			$this->getUser()->setCulture($lang);
			$this->getUser()->setFlash('menu', $menu);
			echo '1';
			return sfView::NONE;
		}
	}
}